<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="/views/common/taglibs.jsp" %>
<!DOCTYPE>
<html>
<head>
    <!-- 引入通用js、css文件(xiaogq) -->
    <meta name="decorator" content="bootstrap"/>
    <link rel="stylesheet" type="text/css" href="${ctx}/css/system/organization/dept/dept_list.css"/>
</head>
<body>
<div class="left2_div">
    <div class="leftFrameWork">
        <div class="frameWorkHead">
            <p>组织架构</p>
        </div>
        <!-- 加载组织数据 -->
        <jsp:include page="/views/common/tree/org_tree.jsp" flush="true" />
    </div>
</div>
<!-- 加载bootstrap表格组件div      -->
<div class="right2_div">
    <div class="rightTable">
        <div class="screenBtn">
            <div class="screenBtnActive" index="2"> <a href="javascript:void(0);">姓名查看</a></div>
        </div>
        <div class="table_div">
            <table id="bootstrapTable"
                   data-striped="true"
                   data-toggle="table"
                   data-show-columns="true"
                   data-cookie="false"
                   data-pagination="true"
                   data-search="true"
                   data-show-refresh="true"
                   data-url="${ctx}/Employee/queryEmployeeAll.do?tableCode=${entity.tableCode}&fields=${fields}"
                   data-side-pagination="server"
                   data-checkbox-header="true"
                   maintainSelected="true"
                   data-query-params="buildQuery"
                   data-page-list="[10,20,50,1000]"
                   class="table">
                <thead>
                <tr>
                    ${columns}
                </tr>
                </thead>
            </table>
        </div>
    </div>
</div>
<script type="text/javascript">
    //bootstrap表格搜索功能方法(chengl)
    function buildQuery(params){
        params.deptScope = _SEARCHCONTENT;
        return params;
    }

    //查看员工详情方法
    function fun_view(node){
        var id = $(node).attr("id");
        var title = $(node).attr("title");
        var rowName = $(node).attr("name");
        var entityId = $(node).attr("tableCode");
        var url = "Employee/employeeView.do?entityId="+entityId +"&id="+ id+"&rowName="+rowName+"&isself=false";
        //parent.addMenu(node,{title:title,url:url,type:"R"});
        var node = {id: "fun_view"+entityId, text:title, url:url};
        //打开tabls标签
        parent.showTab(node);
    }
</script>
</body>
</html>
